<?php /* Smarty version 2.6.26, created on 2013-01-31 16:49:41
         compiled from msearch_muti_dnpwp_shop.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_radios', 'msearch_muti_dnpwp_shop.html', 13, false),array('function', 'html_options', 'msearch_muti_dnpwp_shop.html', 15, false),)), $this); ?>
<?php if (( $this->_tpl_vars['beginopen'] )): ?>
<div id="dialogsearpanel">
<form name = "fmseam">
<table style ="width:100%" class="tableA">
<tr>
<th>店舗</th>
<td>
<input type="text" name="name" value="<?php echo $this->_tpl_vars['nameval']; ?>
" class="text" />&nbsp;
</td>
</tr>
<tr>
<th>AJA名</th>
<td><?php echo smarty_function_html_radios(array('name' => 'sort','class' => 'sort','options' => $this->_tpl_vars['sorts'],'selected' => $this->_tpl_vars['forms']['sort'],'separator' => '&nbsp;'), $this);?>

<span id="tr_op2"  style="display:<?php if (( $this->_tpl_vars['forms']['sort'] == 2 )): ?>block<?php else: ?>none<?php endif; ?>;">
<?php echo smarty_function_html_options(array('id' => 'area_cd','name' => 'area_cd','options' => $this->_tpl_vars['areauser'],'selected' => $this->_tpl_vars['forms']['area_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['area_cd']; ?>
</span> 
<span id="tr_op3"  style="display:<?php if (( $this->_tpl_vars['forms']['sort'] == 3 )): ?>block<?php else: ?>none<?php endif; ?>;">
<?php echo smarty_function_html_options(array('id' => 'zone_cd','name' => 'zone_cd','options' => $this->_tpl_vars['zoneuser'],'selected' => $this->_tpl_vars['forms']['zone_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['zone_cd']; ?>
</span> 
 </td></tr>
</table>
<div class="alignCenter">
	<button type="button" class="btn_filtermuti" id="idbtn_filtermuti"  >検索</button>
</div>
</form>
<div id = "diologlistmuti_dnpwp">
<?php endif; ?>
	<div id="serach_result_muti" class="serach_result">
		<table style="width:100%">
		<?php if ($this->_tpl_vars['forms']['del'] == '1'): ?> 
			<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
			<tr class="selmuti"><td><a href="javascript:delShopTd('<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
')" style="color:blue"><?php echo $this->_tpl_vars['v']['shop_cd']; ?>
&nbsp;&nbsp;<?php echo $this->_tpl_vars['v']['shop_name']; ?>
</a></td>
			<td><?php echo $this->_tpl_vars['v']['local_name']; ?>
<input type="hidden" name="shop_cd_ul[]" value="<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
" /></td></tr>
			<?php endforeach; endif; unset($_from); ?>
		<?php else: ?>
			<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
			<tr class="selmuti"><td><a href="javascript:addShopTd('<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
')" style="color:blue"><?php echo $this->_tpl_vars['v']['shop_cd']; ?>
&nbsp;&nbsp;<?php echo $this->_tpl_vars['v']['shop_name']; ?>
</a></td>
			<td><?php echo $this->_tpl_vars['v']['local_name']; ?>
<input type="hidden" name="shop_cd_ul[]" value="<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
" /></td></tr>
			<?php endforeach; endif; unset($_from); ?>
		<?php endif; ?>
		</table>
	<script type="text/javascript">
	var searchData = new Array();
	<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
		searchData["<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
"] = new seachObj('<?php echo $this->_tpl_vars['v']['area']; ?>
','<?php echo $this->_tpl_vars['v']['zone']; ?>
','<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
','<?php echo $this->_tpl_vars['v']['shop_name']; ?>
','<?php echo $this->_tpl_vars['v']['year_sale']; ?>
','<?php echo $this->_tpl_vars['v']['shop_nums']; ?>
','<?php echo $this->_tpl_vars['v']['ins_count']; ?>
');
	<?php endforeach; endif; unset($_from); ?>
	</script>
	</div>
<?php if (( $this->_tpl_vars['beginopen'] )): ?>
</div>

<script type="text/javascript">
	$('.btn_filtermuti').click(function(){
		gMutiObj = "shop";
		var thesort = $('input:radio[name="sort"]:checked').val() ;
		var urlPara = makeURL( gMutiObj, document.fmseam.name.value, "mserach_muti_dnpwp_shop.php");
		urlPara = urlPara + "&sear=1"
		urlPara = urlPara + "&w=<?php echo $this->_tpl_vars['forms']['w']; ?>
&p=<?php echo $this->_tpl_vars['forms']['p']; ?>
";
		
		if  (thesort == "2"){
			var area =  $("#area_cd").val()
			urlPara = urlPara + "&sort=2&ar=" + area ;
		}
		if  (thesort == "3"){
			var zone =  $("#zone_cd").val()
			
			urlPara = urlPara + "&sort=3&zo=" + zone;
		}
		
		<?php if ($this->_tpl_vars['forms']['del'] == '1'): ?> 
			urlPara = urlPara + "&del=<?php echo $this->_tpl_vars['forms']['del']; ?>
";
		<?php endif; ?>
	//	window.open(urlPara);
		$("#serach_result_muti").load(urlPara);
	});
	
	$('.sort').change(function(){
		if (this.value == 2) {
			$('#tr_op3')['hide']();
			$('#tr_op2')['show']();
		}else if (this.value == 3) {
			$('#tr_op2')['hide']();
			$('#tr_op3')['show']();
		}else {
			$('#tr_op2')['hide']();
			$('#tr_op3')['hide']();
		}
	});
	
	
	$('input').keypress(function(ev) {
		if ((ev.which && ev.which === 13) || (ev.keyCode && ev.keyCode === 13)) {
			$("#idbtn_filtermuti").trigger("click") 
			return false;
		} else {
			return true;
		}
	});
	
	function li_addm(inID, inVal) {
		li_add("pop",inID, inVal);
	}
	
	function li_adds(inArea,inZone,inID, inVal, inSale,inIns) {
		li_add("pop",inID, inVal, inSale);
		$('#dialog').dialog("close");
	}
	document.fmseam.name.focus();
</script>
<?php endif; ?>

	